package com.zuikaku.pojo;

import com.zuikaku.util.TimeUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Order {
    private String orderId;
    private String itemName;
    private int customerId;

    private BigDecimal price;

    private Date createDate;

    public Order(String orderId,String itemName,int customerId,BigDecimal price){
        this.orderId = orderId;
        this.itemName = itemName;
        this.customerId = customerId;
        this.price =price;
    }
    @Override
    public String toString() {
        return "Order{" +
                "orderId='" + orderId + '\'' +
                ", itemName='" + itemName + '\'' +
                ", customerId=" + customerId +
                ", price=" + price +
                ", createDate=" + TimeUtil.formatTime(createDate) +
                '}';
    }
}
